package com.tywj.buscustomerapp.view.item;

import android.support.annotation.NonNull;
import android.view.View;
import android.widget.TextView;

import com.amap.api.services.core.PoiItem;
import com.tywj.buscustomerapp.R;
import com.tywj.buscustomerapp.utils.myadapter.item.AdapterItem;

public class POIItem implements AdapterItem<PoiItem> {
    private TextView title;
    private TextView address;
    @Override
    public int getLayoutResId() {
        return R.layout.item_poisearch;
    }

    @Override
    public void bindViews(@NonNull View root) {
        title = root.findViewById(R.id.poi_title);
        address = root.findViewById(R.id.poi_address);
    }

    @Override
    public void setViews() {

    }

    @Override
    public void handleData(PoiItem poiItem, int position) {
        title.setText(poiItem.getTitle());
        address.setText(poiItem.getProvinceName()+" "+poiItem.getCityName()+" "+poiItem.getSnippet());
    }
}
